
* Main results [Table Left-wing parties]
eststo clear
* Regression between house based wealth and support for the right-wing bloc (column 1)
eststo: qui regress d.LWA GNE , cluster(Id)  
estimates store munileft1
estadd local years "No" , replace
estadd local controls "No" , replace
estadd local trends "No" , replace
* Adding municipality and election fixed effects
eststo: qui regress d.LWA GNE i.Election , cluster(Id) 
estimates store munileft2
estadd local years "Yes" , replace
estadd local controls "No" , replace
estadd local trends "No" , replace
* Adding municipality, election fixed effects and time variant control variables (column 2)
eststo: qui  regress d.(LWA sx1-sx20) GNE i.Election, cluster(Id)
estimates store munileft3
estadd local years "Yes" , replace
estadd local controls "Yes" , replace
estadd local trends "No" , replace
* Adding municipality, election fixed effects, time variant control variables and a quadratic trend (column 3)
eststo: qui xtreg D.LWA d.(sx1-sx20) cd.(sx1-sx20)#c.Housing_returns c.GNE##c.Housing_returns i.Election, fe robust
estimates store munileft4
estadd local years "Yes" , replace
estadd local controls "Yes" , replace
estadd local trends "Yes" , replace

* Exporting Table 1
esttab munileft1 munileft2 munileft3 munileft4 , se title(Unemployment effects at the municipality level 1985-2014.) ///
keep(Housing_returns c.GNE#c.Housing_returns GNE _cons) style(tex) star(* .10 ** .05 *** .01) ///
mtitles("1" "2" "3" "4")  nonumbers s(years controls trends, label("Year effects" "Controls" "Fixed effects")) ///
order(GU Housing_returns c.GNE#c.Housing_returns ) label replace

qui margins, dydx(GNE) at(Housing_returns=(-2 -1 0 1 2 3 4 5 6))  level(95)
 
marginsplot, ciopts(lcolor(green)) graphregion(margin(zero )) addplot(hist Housing_returns if Housing_returns < 11 ,  freq yaxis(2) width(1) legend(off) fcolor(none) color(black) lwidth(thick) graphregion(margin(zero ))) 
